'use strict'

const {cors, parsebody} = require('titbit-toolkit')

let cr = new cors({
    allowHeaders: 'authorization,content-type'
})

module.exports = [
    {
        middleware: cr.mid(),
        pre: true
    },
    {
        middleware: (new parsebody).mid(),
        method: [
           'POST', 'PUT', 'DELETE'
        ] 
    }
]